<?php /* Template Name: Ľudia z VTP */ ?>
<?php
get_header();
?>
<?php

$employees = $vtpEmployees->getEmployees();
// vsetci zamestnanci
echo '<h2>Ľudia z VTP</h2>';
echo '<hr class="h2hr" /><div class="clearer"></div>';
echo '<table id="usersTable">';
echo '<tr>';
echo '<td colspan=2>';
echo '<div class="user" style="width: 50%; margin: auto;">';
$emp = $employees[0];

echo '<table>';
echo '<tr>';
echo '<td class="photo">';
echo '<a href="'.get_bloginfo('url').'/?author='.$emp->ID.'">';
$vtpEmployees->getPhoto($emp->ID);
echo '</a>';
echo '</td>';
echo '<td class="info">';
echo $emp->degree.' '.$emp->first_name.' '.$emp->last_name.'<br />';
echo $emp->position.'<br />';
echo '<a href="mailto:'.$emp->user_email.'">';
echo $emp->user_email.'<br />';
echo '</a>';
echo $emp->phone1.'<br />';
echo '</td>';
echo '</tr>';
echo '</table>';

echo '</div>';
echo '</td>';
echo '</tr>';
echo '<tr>';
for ($i = 1; $i < count($employees); $i++) {
    $emp = $employees[$i];
    echo '<td>';
    echo '<div class="user">';

    echo '<table>';
    echo '<tr>';
    echo '<td class="photo">';
    echo '<a href="'.get_bloginfo('url').'/?author='.$emp->ID.'">';
    $vtpEmployees->getPhoto($emp->ID);
    echo '</a>';
    echo '</td>';
    echo '<td class="info">';
    echo $emp->degree.' '.$emp->first_name.' '.$emp->last_name.'<br />';
    echo $emp->position.'<br />';
    echo '<a href="mailto:'.$emp->user_email.'">';
    echo $emp->user_email.'<br />';
    echo '</a>';
    echo $emp->phone1.'<br />';
    echo '</td>';
    echo '</tr>';
    echo '</table>';

    echo '</div>';
    echo '</td>';
    if ($i % 2 == 0) {
        echo '</tr><tr>';
    }
}
echo '</tr>';
echo '</table>';


?>
<?php
get_footer();
?>